// TOWN DIALOGUE SCRIPT
//    Town 107: Drake Aerie

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 1;
	state = -1;
	nextstate = 1;
	question = "Dalakros";
	text1 = "This thing is a mindless construct, created by Dalakros. It stares straight ahead like a statue.";

// Dalakros

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 1;
	question = "Dalakros";
	text1 = "You come face to face with a massive drake. It roars, _I am Dalakros! You have invaded my lair!_ The creature's words are indistinct. It is drooling.";
	text2 = "You can see that it is getting thin. Its scales are beginning to lose their sheen, and it is losing muscle mass. It is slowly starving up here.";
	text5 = "Dalakros watches you hungrily. It is an effort for it to summon up enough will to not devour you. _Speak fast, morsel. You have little time._";
	action = INTRO;

begintalknode;
	state = 1;
	nextstate = 2;
	condition = gf(107,8) == 0;
	question = "_I wish to speak with you. Are you willing?_";
	text1 = "It looks at you with naked hunger. _Speak, but soon I must hunt._";

begintalknode;
	state = 2;
	nextstate = 3;
	question = "_What will you hunt for?_";
	text1 = "_I hunt for sustenance, as I long have, in the woods. But the golems have taken my food away!_";

begintalknode;
	state = 3;
	nextstate = 4;
	question = "_How have golems taken your food?_";
	text1 = "_They kill all. All the deer, all the bears, and I have little choice but to sometimes hunt human meat!_";

begintalknode;
	state = 4;
	nextstate = 5;
	question = "_That's awful. How could you?_";
	text1 = "_I can hardly afford morality when I starve. I have even hunted a wizard, who sometimes flies over the woods to the east. It is not something I wish to do, but I have no choice._";
	text2 = "_That is why I have hoped you mortals would approach me to speak._";

begintalknode;
	state = 5;
	nextstate = 6;
	question = "_Well, here I am. Speak._";
	text1 = "_I will resist my urges for your meat, and leave flying humans alone, but only if you adventurers personally swear to do all you can to destroy the golems. Agree or disagree?_";
	text2 = "The creature sways back and forth, looking for any excuse to pounce and devour you.";

begintalknode;
	state = 6;
	nextstate = -1;
	condition = gf(107,8) == 0;
	question = "_I can't. How can you expect me to fight off the golems? They are too dangerous._";
	text1 = "The drake becomes infuriated, and his hunger suddenly takes control of him. _Fine, then!_ he roars. _Then there is only one other way you may be of use to me!_ He attacks.";
	action = END_TALK;
	code =
		set_attitude(10700,10);
		set_attitude(10701,10);
		set_attitude(10702,10);
		set_attitude(10703,10);
	break;

begintalknode;
	state = 6;
	nextstate = -1;
	condition = gf(107,8) == 0;
	question = "_I agree. I promise to do everything I can to destroy the golem plague._";
	text1 = "He nods. _Then I will not attack humans. For now. This I swear._ (You take note of this.) _But remember, if you take too long, I may not be able to help myself. Now go. Good luck to you._";
	action = SET_SDF 107 8 1;
	code =
		toggle_quest(81,1);
	break;

begintalknode;
	state = 1;
	nextstate = 1;
	condition = gf(106,11) >= 1 && gf(107,8) <= 0;
	question = "_You have been attacking a mage that likes to fly around here. He asked us to approach you and ask you to stop._";
	text1 = "_Maybe I can. Or maybe I can't. Let me tell you the story of my struggles, and of the problems with the golems._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(107,8) == 1 && gf(308,0) >= 1;
	question = "_I have destroyed the golems. They will cause you no more trouble._";
	code =
		run_hardcode(38);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(107,8) >= 1 && gf(308,0) == 0;
	question = "_I have not yet destroyed the golems. But I will try._";
	text1 = "_Then go. Resume the fight. My hunger grows with every passing minute, and I will not be able to bottle it up much longer._";
	action = END_TALK;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(107,8) > 0;
	question = "_Can you teach me anything of magic or battle?_";
	text1 = "_My only desire now is to hunt. You want me to teach you? Then learn this. When you are hungry, feed. That is all, in the end, there is to know. Now, leave me. I must fly!_";
	action = END_TALK;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(308,0) > 0;
	question = "_How has your hunting been lately?_";
	text1 = "_Better. Recently, I caught a deer. The first I had snatched since the golems came. You have helped satisfy my hunger, so I spare you._";

begintalknode;
	state = 1;
	nextstate = -1;
	condition = gf(107,8) > 0;
	question = "_Actually, I think it'd be safer for humans if I just killed you._ Attack.";
	text1 = "Dalakros roars with rage. A spray of hunger-splittle flies out. _You dare? Little fool! I will eat you now!_";
	action = END_TALK;
	code =
		set_attitude(10700,10);
		set_attitude(10701,10);
		set_attitude(10702,10);
		set_attitude(10703,10);
	break;

begintalknode;
	state = 1;
	nextstate = -1;
	condition = 1;
	question = "_I should be going._";
	text1 = "_Yes. Go. I must hunt!_";
	action = END_TALK;

